import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '提现金额限制',
    align:"center",
    dataIndex: 'withdrawal',
   },
   {
    title: '限制高',
    align:"center",
    dataIndex: 'blXg',
   },
   {
    title: '保底',
    align:"center",
    dataIndex: 'blBd',
   },
   {
    title: '现金兑换比率',
    align:"center",
    dataIndex: 'cashRate',
   },
   {
    title: '工币兑换比率',
    align:"center",
    dataIndex: 'gbRate',
   },
   {
    title: '公告跳转页面',
    align:"center",
    dataIndex: 'gonggaoPath',
   },
   {
    title: '生态规划跳转页面',
    align:"center",
    dataIndex: 'shengtaiguihuaPath',
   },
   {
    title: '先锋计划跳转页面',
    align:"center",
    dataIndex: 'xianfengjihuaPath',
   },
   {
    title: '邀请好友跳转页面',
    align:"center",
    dataIndex: 'yaoqinghaoyouPath',
   },
   {
    title: '实名认证跳转页面',
    align:"center",
    dataIndex: 'shimingrenzhengPath',
   },
   {
    title: '关于我们',
    align:"center",
    dataIndex: 'guanyuwomenPath',
   },
   {
    title: '隐私正常',
    align:"center",
    dataIndex: 'yinsizhengcePath',
   },
   {
    title: '我的工币',
    align:"center",
    dataIndex: 'wodegongbiPath',
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '提现金额限制',
    field: 'withdrawal',
    component: 'Input',
  },
  {
    label: '限制高(0开启1关闭)',
    field: 'blXg',
    component: 'Input',
  },
  {
    label: '保底(0开启1关闭)',
    field: 'blBd',
    component: 'Input',
  },
  {
    label: '现金兑换比率',
    field: 'cashRate',
    component: 'InputNumber',
  },
  {
    label: '工币兑换比率',
    field: 'gbRate',
    component: 'InputNumber',
  },
  {
    label: '公告跳转页面',
    field: 'gonggaoPath',
    component: 'Input',
  },
  {
    label: '生态规划跳转页面',
    field: 'shengtaiguihuaPath',
    component: 'Input',
  },
  {
    label: '先锋计划跳转页面',
    field: 'xianfengjihuaPath',
    component: 'Input',
  },
  {
    label: '邀请好友跳转页面',
    field: 'yaoqinghaoyouPath',
    component: 'Input',
  },
  {
    label: '实名认证跳转页面',
    field: 'shimingrenzhengPath',
    component: 'Input',
  },
  {
    label: '关于我们',
    field: 'guanyuwomenPath',
    component: 'Input',
  },
  {
    label: '隐私正常',
    field: 'yinsizhengcePath',
    component: 'Input',
  },
  {
    label: '我的工币',
    field: 'wodegongbiPath',
    component: 'Input',
  },  
  {
    label: '状态',
    field: 'bannerStatus',
    component: 'JDictSelectTag',
    componentProps:{
      dictCode: 'status',
      placeholder: '请选择状态',
      stringToNumber: true,
     },
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  withdrawal: {title: '提现金额限制',order: 0,view: 'text', type: 'string',},
  cashRate: {title: '现金兑换比率',order: 1,view: 'number', type: 'number',},
  gbRate: {title: '工币兑换比率',order: 2,view: 'number', type: 'number',},
  gonggaoPath: {title: '公告跳转页面',order: 3,view: 'text', type: 'string',},
  shengtaiguihuaPath: {title: '生态规划跳转页面',order: 4,view: 'text', type: 'string',},
  xianfengjihuaPath: {title: '先锋计划跳转页面',order: 5,view: 'text', type: 'string',},
  yaoqinghaoyouPath: {title: '邀请好友跳转页面',order: 6,view: 'text', type: 'string',},
  shimingrenzhengPath: {title: '实名认证跳转页面',order: 7,view: 'text', type: 'string',},
  guanyuwomenPath: {title: '关于我们',order: 8,view: 'text', type: 'string',},
  yinsizhengcePath: {title: '隐私正常',order: 9,view: 'text', type: 'string',},
  wodegongbiPath: {title: '我的工币',order: 10,view: 'text', type: 'string',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}